package to;

public class JobTO {
	private int no;
	private String jobName;
	private String startTime;
	private String endTime;
	private String articleType;
	private int workLoad;
	private String fault;
	public JobTO() {}
	
	public JobTO(String jobName, String startTime, String endTime) {
		this.jobName = jobName;
		this.startTime = startTime;
		this.endTime = endTime;
	}

	public JobTO(String jobName, String startTime, String endTime,
			String articleType, int workLoad, String fault) {
		this.jobName = jobName;
		this.startTime = startTime;
		this.endTime = endTime;
		this.articleType = articleType;
		this.workLoad = workLoad;
		this.fault = fault;
	}
	public JobTO(int no, String jobName, String startTime, String endTime,
			String articleType, int workLoad, String fault) {
		this.no = no;
		this.jobName = jobName;
		this.startTime = startTime;
		this.endTime = endTime;
		this.articleType = articleType;
		this.workLoad = workLoad;
		this.fault = fault;
	}
	public int getNo() {
		return no;
	}

	public void setNo(int no) {
		this.no = no;
	}

	public String getJobName() {
		return jobName;
	}
	public void setJobName(String jobName) {
		this.jobName = jobName;
	}
	public String getStartTime() {
		return startTime;
	}
	public void setStartTime(String startTime) {
		this.startTime = startTime;
	}
	public String getEndTime() {
		return endTime;
	}
	public void setEndTime(String endTime) {
		this.endTime = endTime;
	}
	public String getArticleType() {
		return articleType;
	}
	public void setArticleType(String articleType) {
		this.articleType = articleType;
	}
	public int getWorkLoad() {
		return workLoad;
	}
	public void setWorkLoad(int workLoad) {
		this.workLoad = workLoad;
	}
	public String getFault() {
		return fault;
	}
	public void setFault(String fault) {
		this.fault = fault;
	}
	@Override
	public String toString() {
		return "JobTO [no=" + no + ", jobName=" + jobName + ", startTime="
				+ startTime + ", endTime=" + endTime + ", articleType="
				+ articleType + ", workLoad=" + workLoad + ", fault=" + fault
				+ "]";
	}
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result
				+ ((articleType == null) ? 0 : articleType.hashCode());
		result = prime * result + ((endTime == null) ? 0 : endTime.hashCode());
		result = prime * result + ((fault == null) ? 0 : fault.hashCode());
		result = prime * result + ((jobName == null) ? 0 : jobName.hashCode());
		result = prime * result + no;
		result = prime * result
				+ ((startTime == null) ? 0 : startTime.hashCode());
		result = prime * result + workLoad;
		return result;
	}
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		JobTO other = (JobTO) obj;
		if (articleType == null) {
			if (other.articleType != null)
				return false;
		} else if (!articleType.equals(other.articleType))
			return false;
		if (endTime == null) {
			if (other.endTime != null)
				return false;
		} else if (!endTime.equals(other.endTime))
			return false;
		if (fault == null) {
			if (other.fault != null)
				return false;
		} else if (!fault.equals(other.fault))
			return false;
		if (jobName == null) {
			if (other.jobName != null)
				return false;
		} else if (!jobName.equals(other.jobName))
			return false;
		if (no != other.no)
			return false;
		if (startTime == null) {
			if (other.startTime != null)
				return false;
		} else if (!startTime.equals(other.startTime))
			return false;
		if (workLoad != other.workLoad)
			return false;
		return true;
	}
	
}
